1. Field of the Invention
This invention is related to the field of digital systems and, more particularly, to maintaining cache coherency in such systems.
2. Description of the Related Art
A bus is frequently used in digital systems to interconnect a variety of devices included in the digital system. Generally, one or more devices are connected to the bus, and use the bus to communicate with other devices connected to the bus. As used herein, the term “agent” refers to a device which is capable of communicating on the bus. The agent may be a requesting agent if the agent is capable of initiating transactions on the bus and may be a responding agent if the agent is capable of responding to a transaction initiated by a requesting agent. A given agent may be capable of being both a requesting agent and a responding agent. Additionally, a “transaction” is a communication on the bus. The transaction may include an address transfer and optionally a data transfer. Transactions may be read transactions (transfers of data from the responding agent to the requesting agent) and write transactions (transfers of data from the requesting agent to the responding agent). Transactions may further include various coherency commands which may or may not involve a transfer of data.
A feature of many buses is a coherency protocol. The protocol is used by agents to ensure that transactions are performed in a coherent manner. More particularly, the coherency protocol is used, when one or more agents may cache data corresponding to a memory location, to ensure that cached copies and the memory location are updated to reflect the effect of various transactions which may be performed by various agents.
In some cases, coherency may be maintained via a snooping process in which each agent which may cache data may search its caches for a copy of the data affected by the transaction, as well as the state that the copy is in. As used herein, the “state” of a cached copy of data may indicate a level of ownership of the data by the caching agent. The level of ownership indicates what operations are permissible on the cached copy. For example, a read of the cached copy may generally be permissible with any level of ownership other than no ownership (i.e. no cached copy is stored). A write may be permissible for levels of ownership which indicate that no other cached copies exist. An exemplary set of states may be the Modified, Exclusive, Shared, and Invalid (MESI) states or the MOESI states (including the MESI states and an owned state). Caching agents may report, using the coherency protocol, the state of the data within that agent. Based on the states reported using the coherency protocol, each agent may determine the action to take to update its state for the data being accessed by the transaction.
It is desirable for the state of the cached copy to be reported as soon as possible. Delayed reporting of the state may result in increased latency for the transaction. Furthermore, the amount of delay from initiating the transaction to reporting the state of the data affected by the transaction may make the coherency mechanism more complex. Unfortunately, it may be difficult to determine the exact state of the data quickly. Furthermore, to determine the exact state of the data may require intrusive changes to caches within the agent and/or to circuitry that interfaces with the caches.